package ar.edu.unq.wannaplay.utils;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

import ar.edu.unq.wannaplay.dtos.EmployeeDTO;
import ar.edu.unq.wannaplay.dtos.SkillDTO;
import ar.edu.unq.wannaplay.employee.PersonalData;

public class EmployeeEditer implements Serializable {

    private static final long serialVersionUID = 1L;

    private String name;

    private String email;

    private String surname;

    private String dni;

    private String address;

    private int id;

    private String town, university;

    private List<SkillDTO> skillsDTO;

    private String telephone;

    public EmployeeEditer(final EmployeeDTO employee) {
        this.setId(employee.getId());
        this.setName(employee.getName());
        this.setSurname(employee.getSurname());
        this.setEmail(employee.getEmail());
        this.setDni(employee.getDni());
        this.setTown(employee.getTown());
        this.setUniversity(employee.getUniversity());
        this.setSkillsDTO(employee.getSkills());
        this.setTelephone(employee.getTelephone());
        this.setAddress(employee.getAddress());

    }

    public EmployeeEditer() {
        this.setName("");
        this.setSurname("");
        this.setEmail("");
        this.setDni("");
        this.setTown("");
        this.setUniversity("");
        this.setTelephone("");
        this.setAddress("");
        this.setSkillsDTO(new LinkedList<SkillDTO>());

    }

    public void setEmail(final String email) {
        this.email = email;
    }

    public String getEmail() {
        return email;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setSurname(final String surname) {
        this.surname = surname;
    }

    public String getSurname() {
        return surname;
    }

    public void setDni(final String dni) {
        this.dni = dni;
    }

    public String getDni() {
        return dni;
    }

    public void setTown(final String town) {
        this.town = town;
    }

    public String getTown() {
        return town;
    }

    public void setUniversity(final String university) {
        this.university = university;
    }

    public String getUniversity() {
        return university;
    }

    public void setSkillsDTO(final List<SkillDTO> skillsDTO) {
        this.skillsDTO = skillsDTO;
    }

    public List<SkillDTO> getSkillsDTO() {
        return skillsDTO;
    }

    public void setId(final int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public void setTelephone(final String telephone) {
        this.telephone = telephone;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setAddress(final String address) {
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public PersonalData personalData() {
        return new PersonalData(this.getName(), this.getSurname(), this.getDni(), this.getAddress(), this.getTown(),
                this.getTelephone(), this.getEmail(), this.getUniversity());
    }

}
